import axios from 'axios'
// 创建
const request = axios.create({
    baseURL:"/",
    timeout:3000
})
// 请求拦截
request.interceptors.request.use(function(config){
    config.headers.Authorization = "Bearer "+localStorage.getItem("token");
    return config;
})
// 响应兰拦截
request.interceptors.response.use(function(res){return res},function(err){console.error(err);return err})
// 导出
export default request;